home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / APPKILL.HDR < prev    next >
Text File  |  1994-04-25  |  3KB  |  76 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _AppKill(cKillFileName) --> NIL
  8.  
  9. PARAMETERS:
  10.  
  11. cKillFileName : File to display as application terminates
  12.  
  13. SHORT:
  14.  
  15. Prevent an application from being run, or stop one that is already running.
  16.  
  17. DESCRIPTION:
  18.  
  19. _AppKill() is run from _Prepare().  It takes a single parameter indicating
  20. the file name of a file whose presence will trigger the termination of an
  21. application.
  22.  
  23. The default file name is @DISABLE.!!!  If you use the default name, you
  24. needn't specify any parameter to the function.
  25.  
  26. When the function is called, it checks the current directory for a file
  27. called @DISABLE.!!! (or the file name in cKillFileName, if specified).  This
  28. file serves two related purposes: (1) to cause the application running to be
  29. terminated, and (2) to hold the contents of a message that is to be displayed
  30. as the system is shutting down.  If the file exists, the program is
  31. terminated.  If the file exists but is empty, then no display is given other
  32. than "Press any key..." and the application simply returns to a command line
  33. (or whatever called it).  If the file exists and contains data, that data is
  34. displayed before the "press any key" message.
  35.  
  36. By the judicial scattering around of this function call in key places (such
  37. as in menu loops and before and after edit screens), a system administrator
  38. may contain complete control of the application at all times.  When updates
  39. or other maintenance need to be performed, users can be notified that the
  40. application will be unavailable in X minutes, and then you simply copy the
  41. disable file to the applications working directory.  All users applications
  42. will immediately be terminated without terminating their network connection.
  43. They all receive the message that is contained in the disable file (remember
  44. the default name of this file is "@DISABLE.!!!")
  45.  
  46. NOTE:
  47.  
  48.  
  49.  
  50. EXAMPLE:
  51.  
  52. // A file called "KILL_ME.TXT" exists in the current directory.  It's
  53. // contents are:
  54. //
  55. // THE SYSTEM ADMINISTRATOR HAS TEMPORARILY DISABLED THIS APPLICATION
  56. // SO THAT EMERGENCY MAINTENANCE CAN BE PERFORMED.  WE APOLOGIZE FOR
  57. // THIS INCONVENIENCE.
  58.  
  59.  
  60. _Terminate()
  61.  
  62. Result: The application terminates.  The default file name of @DISABLE.!!! is
  63. assumed.
  64.  
  65. _Terminate("NOEXIST.TXT")
  66.  
  67. Result: Since NOEXIST.TXT doesn't exist, the effect is exactly the same as
  68. the previous call.
  69.  
  70. _Terminate("KILL_ME.TXT")
  71.  
  72. Result: The application is terminated and the user sees the message that
  73. appears in the comment above.
  74.  
  75. ******************************************************************************/
  76.